<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>折线图</title>
		<script type="text/javascript" src="js/echarts.js" ></script>
	</head>
	<body>
		<div id="sales" style="width: 600px;height: 300px;">
			
		</div>
		<script>
			myCharts=echarts.init(document.getElementById("sales"));
			var option={
				title:{
					text:"一周销量变化曲线",
					subtext:"2022年",
					left:"center"	
				},
				xAxis:{
					type:"category",
					data:['周一','周二','周三','周四','周五']
				},
				yAxis:{
					type:"value"
				},
				legend:{
					data:["鼠标销量","水杯销量"],
					left:"right"
				},
				series:[
				{
					name:"鼠标销量",
					data:[200,350,180,200,700],
					type:"line",
					smooth:true
				},
				{
					name:"水杯销量",
					data:[500,350,180,200,700],
					type:"line",
					smooth:true
				}
				]
			};
			myCharts.setOption(option);
		</script>
	</body>
</html>
